package day0302;

public enum Week {

    // 都是 Week 的实例
    MONDAY("星期一"), TUESDAY("星期二")
    , WEDNESDAY("星期三"), THURSDAY("星期四")
    , FRIDAY("星期五"), SATURDAY("星期六")
    , SUNDAY("星期天");

    private String text;

    private Week(String text){
        this.text = text;
    }

    public void show(){
        System.out.println(ordinal() + " : " + this.text);
    }

    public static Week get(int num) {
        return Week.values()[num - 1];
    }

}
